package tpdisenio2009.mvp.display;

import java.awt.event.ActionListener;
import java.util.Collection;
import java.util.List;
import javax.swing.event.ListSelectionListener;
import tpdisenio2009.model.beans.Score;
import tpdisenio2009.model.beans.SoccerMatch;
import tpdisenio2009.model.beans.SoccerPlayer;
import tpdisenio2009.model.beans.TournamentDate;

/**
 *
 * @author Nicolás Kreiff
 */
public interface ManageTournamentDatePointsView extends View {

    void showError( String errorMessage, String titleMessageWindow );
    void showOK( String okMessage, String titleMessageWindow);

    void setDates( List<TournamentDate> dates );
    TournamentDate getDate();
    void setFirstOpenDate( TournamentDate date );
    void addDateChangeListener( ActionListener listener );
    void removeDateChangeListener( ActionListener listener );

    void addCloseSessionListener( ActionListener listener );
    void removeCloseSessionListener( ActionListener listener );

    void loadMatchs( List<SoccerMatch> matchs );
    SoccerMatch getSelectedMatch();
    List<SoccerMatch> getMatchs();

    void addStateChangedListener( ActionListener listener );
    void removeStateChangedListener( ActionListener listener );

    void addShowDetailsListener( ActionListener listener );
    void removeShowDetailsListener( ActionListener listener );

    void setLocalTeamName( String localTeamName );
    void setVisitorTeamName( String visitorTeamName );

    void loadLocalPlayers( List<SoccerPlayer> players );
    void loadVisitorPlayers( List<SoccerPlayer> players );
    SoccerPlayer getSelectedPlayer();
    void addPlayerSelectionListener( ListSelectionListener listener );
    void removePlayerSelectionListener( ListSelectionListener listener );

    void setFirstPlayerSelected();

    void disableMatchTable();
    void enableMatchTable();

    void disableHomeTable();
    void enableHomeTable();

    void disableVisitorTable();
    void enableVisitorTable();

    void showPoints();
    void hidePoints();

    void setPlayerScore( Score score );
    Collection<Score> getUpdatedScores();
    
    void addSaveListener( ActionListener listener );
    void removeSaveListener( ActionListener listener );

    boolean showConfirmation( String notifiactionMessage );

}
